﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace SingleBlog.Web.Models
{
    /// <summary>
    /// 根据指定分类查找文章的视图模型
    /// </summary>
    public class CategoryArticleViewModel
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CategoryArticleViewModel"/> class.
        /// </summary>
        /// <param name="categoryId">The category identifier.</param>
        public CategoryArticleViewModel(int categoryId)
        {
            this.CategoryId = categoryId;
        }

        /// <summary>
        /// 获取或设置要获取的记录行数。默认是10.
        /// </summary>
        public int Take { get; set; } = 10;
        /// <summary>
        /// 获取或设置需要优先跳过的记录行数。
        /// </summary>
        public int Skip { get; set; }
        /// <summary>
        /// 获取分类Id。
        /// </summary>
        public int CategoryId { get;}
        /// <summary>
        /// 获取或设置一个布尔值，表示是否只获取推荐的文章。
        /// </summary>
        /// <value>
        ///   如果只获取推荐文章，则为 <c>true</c>；否则为 <c>false</c>。
        /// </value>
        public bool OnlyRecommand { get; set; }

        /// <summary>
        /// 是否显示 "查看更多" 的超链接，默认 true。
        /// </summary>
        public bool ShowMore { get; set; } = true;

        /// <summary>
        /// “查看更多”的文本
        /// </summary>
        public string ShowMoreText { get; set; } = "更多内容>>";

        /// <summary>
        /// 空数据显示的文本
        /// </summary>
        public string EmptyDataText { get; set; } = "暂无任何内容";
    }
}
